package design_pattern.factoty;

public class ShapeFactory {
    public  Shape getShape(String name){
        if(name==null) {
            return null;
        }
        if(name.equalsIgnoreCase("circle")) {
            return new Circle();
        }else if(name.equalsIgnoreCase("square")){
            return new Sqare();
        }else if(name.equalsIgnoreCase("Rectangle")){
            return new Rectangle();
        }
        return null;
    }
}
